<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>13 浅拷贝：loadsh提供_clone</title>
</head>

<body>
  <!-- <script src="../../node_modules/lodash/lodash.js"></script> -->
  <script src="https://cdn.bootcdn.net/ajax/libs/lodash.js/4.17.21/lodash.min.js"></script>
  <script>
    let obj1 = { name: 'Henry', arr: [1, 2, 4] }
    let obj2 = _.clone(obj1)

    console.log(obj2)
    console.log(obj2 === obj1) //=> false
    console.log(obj2.arr === obj1.arr) //=> true
  </script>
</body>

</html>